<?php

class Core_View{

    protected $_scriptName;
    protected $_view;

    public function __construct($scriptName)
    {
        $this->_scriptName = $scriptName;
        $this->init();
    }

    protected function init()
    {
        $config = array(
            'scriptPath' => 'Templates'
        );

        $this->_view = new Zend_View($config);
    }

    public function fetch()
    {
        return $this->_view->render($this->_scriptName);
    }

    public function  __set($name, $value) {
        $this->_view->assign($name, $value);
    }

    public function getView()
    {
        return $this->_view;
    }

}
